import request from '@/utils/request'

export function getManagerList(nikeName,roleId,status,index,size) {
  return request({
    url: '/admin/managerMain/getManagerList',
    method: 'post',
    data: {
      nikeName,
      roleId,
			status,
			index,
			size
    }
  })
}

export function addManager(loginName,phone,email,roleId){
	return request({
		url:'/admin/managerMain/addManager',
		method:'post',
		data:{
			loginName,
			phone,
			email,
			roleId
		}
	})
}

export function getManagerInfo(managerId){
	return request({
		url:'/admin/managerMain/getManagerInfo',
		method:'post',
		data:{
			managerId
		}
	})
}

export function updateManager(managerId,nikeName,password,phone,email,roleId,status,headUrl){
	return request({
		url:'/admin/managerMain/updateManager',
		method:'post',
		data:{
			managerId,
			nikeName,
			password,
			phone,
			email,
			roleId,
			status,
      headUrl
		}
	})
}

export function deleteManager(managerId){
	return request({
		url:'/admin/managerMain/deleteManager',
		method:'post',
		data:{
			managerId,
			status:2,
		}
	})
}

export function getCurrentManagerInfo(){
	return request({
		url:'/admin/managerMain/getCurrentManagerInfo',
		method:'post',
		data:{

		}
	})
}

export function updateCurrentManager(managerId,nikeName,password,email,phone,headUrl){
	return request({
		url:'/admin/managerMain/updateCurrentManager',
		method:'post',
		data:{
			managerId,
			nikeName,
			password,
			email,
			phone,
      headUrl
		}
	})
}
